package com.springboot.cloud.demos.feign.service;

import com.springboot.cloud.common.core.entity.vo.Result;
import com.springboot.cloud.demos.entity.form.MomentSupportForm;
import com.springboot.cloud.demos.entity.po.MomentSupport;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "ribbon-consumer", fallback = MomentSupportServiceFallback.class)
public interface MomentSupportService {

    @RequestMapping(value = "/momentSupport", method = RequestMethod.POST)
    Result save(@RequestBody MomentSupportForm momentSupportForm);

    @RequestMapping(value = "/momentSupport/queryByUser", method = RequestMethod.GET)
    Result<MomentSupport> queryByUser(@RequestParam("userId") String userId, @RequestParam("type") Integer type, @RequestParam("momentId")  String momentId);

    @RequestMapping(value = "/momentSupport/{id}", method = RequestMethod.DELETE)
    Result delete(@PathVariable(value="id") String id);

    @RequestMapping(value = "/momentSupport/querySignUpList", method = RequestMethod.GET)
    Result querySignUpList(@RequestParam("momentId")  String momentId);
}
